using System.Collections.Generic;

using BLToolkit.Data;
using BLToolkit.DataAccess;

using EMan.Common.EnterpriseStructure;
using EMan.Server.Interface.DAL;

namespace EMan.DAL.Firebird
{
  public abstract class JobDalc : Dalc< Job >, IDalc< Job >
  {
    //[SqlQuery("select Id, Name, Description, Revision from Job")]
    public abstract IList< Job > GetList();

    //[SqlQuery("select Id, Name, Description, Revision from Job where Id = @Id")]
    public abstract Job Get( int id );

    [ScalarSource(ScalarSourceType.ReturnValue)]
    public abstract bool Insert( [Direction.Output( "Id", "Revision" )] Job job );

    [ScalarSource(ScalarSourceType.ReturnValue)]
    public abstract bool Update( [Direction.InputOutput( "Revision" )] Job job );

    [ScalarSource(ScalarSourceType.AffectedRows)]
    [SqlQuery("delete from Job where id = @id")]
    public abstract bool Delete( int id );
  }
}